/*
 * aksImage.h
 *
 *  Created on: 2011/06/18
 *      Author: AKS
 */

#ifndef AKSIMAGE_H_
#define AKSIMAGE_H_

#include "core/include/types.h"

/* ------ image type ------ */
typedef enum t_AksColorType
{
	AKS_MONO  =1,
	AKS_BGR   =3
} AksColorType;


typedef struct t_AksPoint
{
    WORD x;
	WORD y;
} AksPoint;

AksPoint aksPoint(WORD w, WORD h);

typedef struct t_AksPixel
{
    BYTE B;
    BYTE G;
    BYTE R;
} AksPixel;

AksPixel aksPixel(BYTE b, BYTE g, BYTE r);


typedef struct t_AksImage
{
	DWORD           imgPtr;
	WORD            width;
	WORD            widthStep;
	DWORD           height;
    AksColorType    colorType;
	BYTE            depth;
    AksPoint        offset;
} AksImage;

AksImage *createImage(WORD width, WORD height, DWORD imgPtr, AksImage *dst, AksColorType type, AksPoint offset);



/* ------ basic image operator ------ */
void     aksSet2D(AksImage *img, DWORD w, DWORD h, AksPixel pixel);
AksPixel aksGet2D(AksImage *img, DWORD w, DWORD h);
void     aksSetZero(AksImage *img);


#endif /* AKSIMAGE_H_ */
